package com.our.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import com.our.model.RewardType;
import com.our.model.Rewards;
import com.our.model.Users;
@MapperScan
public interface RewardTypeMapper {
    int deleteByPrimaryKey(Integer typeId);

    int insert(RewardType record);

    int insertSelective(RewardType record);

    RewardType selectByPrimaryKey(Integer typeId);

    int updateByPrimaryKeySelective(RewardType record);

    int updateByPrimaryKey(RewardType record);
    
    List<RewardType> selectAll();
    
    int countTypeId(int userId);

	List<RewardType> selectByUserId(int userId);
	
	int countNum(@Param("userId") int userId,@Param("rewardId") int rewardId,@Param("typeState") int typeState);

	List<RewardType> selectByUserIdAndRewardId(@Param("user")Users user,@Param("reward")Rewards reward);
	List<RewardType> selectByUserIdAndRewardId1(@Param("userId")int userId,@Param("rewardId")int rewardId);
}